home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 4 / developer source - volume 4.iso / parad / mar95 / koci101.gif < prev    next >
Graphics Interchange Format  |  1995-11-15  |  18KB  |  547x455  |  4-bit (5 colors)
Labels: text | electronics | screenshot | font | number | display | software
OCR: ObjectPAL Reference File Edit Bookmark Help Contents Search Back History Search All Paradox Self Self is a built-in object varaible that represents the object to which the currently executing code is attached. For example, when the following statement executes in the mouseEnter method attached to theBox, Self refers to theBox. self.color = Red But, suppose a method attached to theBox calls a custom method named changeColor attached to the page. Suppose the code for changeColor is method changeColor () self.color = Blue endMethod When the method attached to theBox calls changeColor, the page turns blue, not theBox. Why? Because Self refers to the object to which the code is attachedregardless of which object actually called the codeand in this case, the code is attached to the page. The single exception to this rule is when Self appears in a statement in a library. In this case, Self refers to the object that called the library routine. When an event occurs, Self and eventInfo.getTarget may refer to the same object, but as events bubble up the containership chain, the target remains fixed while Self changes to refer to the object executing the method. Self always refers to a UlObject, not to the objects value or the objects name.